﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Ooaavee.Scripting;
using Ooaavee.TestTools;

namespace UnitTests.Ooaavee.TestTools
{
    /// <summary>
    /// Tests Template class.
    /// </summary>
    [TestClass]
    public class TemplateTest : TestBase
    {
        /// <summary>
        /// Tests GetTemplate method.
        /// Language is C#.
        /// </summary>
        [TestMethod]
        public void GetTemplateTest1()
        {
            Template_Accessor template = Template_Accessor.GetTemplate(Language.CSharp);            
            Assert.IsNotNull(template);
            Assert.IsNotNull(template.FullTemplateText);
            Assert.AreEqual(Language.CSharp, template.Language);
        }

        /// <summary>
        /// Tests GetTemplate method.
        /// Language is Visual Basic.
        /// </summary>
        [TestMethod]
        public void GetTemplateTest2()
        {
            Template_Accessor template = Template_Accessor.GetTemplate(Language.VisualBasic);
            Assert.IsNotNull(template);
            Assert.IsNotNull(template.FullTemplateText);
            Assert.AreEqual(Language.VisualBasic, template.Language);
        }
    }
}
